package org.corey.wyp.vo
{
	import mx.collections.ArrayCollection;
	
	[Bindable]
	[RemoteClass(alias="org.corey.wyp.vo.Calendar")]
	public class Calendar
	{	
		public var id:int;
		public var year:int;
		public var month:int;
		public var date:int;
		public var accountItems:ArrayCollection=new ArrayCollection();
		private var _out:Number=0;
		private var calculated:Boolean=false;
		
		public function Calendar()
		{
		}
		
		public function get out():Number{
			if(!calculated){
				if(accountItems!=null && accountItems.length>0){
					for(var i:int=0;i<accountItems.length;i++){
						_out+=AccountItem(accountItems[i]).itemOut;
					}
				}
			}
			calculated=true;
			return _out;
		}
		
	}
}